<?php

	include_once('./mvc/modelo/Accesatabla.php');
	include_once('./mvc/modelo/diseno.php');
	$razas = new Accesatabla('razas');
	$ds = new Diseno();
	
	
	$cont ='
	<center>
		<div class="row">
			<div class="col-sm-12 col-md-12 col-lg-12">																		
				<h3>Razas</h3><hr>							
			</div>
		</div>
		<div class="overthrow" style="overflow:auto;">
			<table class="table table-bordered">
				<tr class="info">
					<th>#</th>
					<th>Raza</th>
					<th>Descripci&oacute;n</th>
					<th></th>
				</tr>';
	$n=1;
	$r = $razas->buscardonde('ID > 0 and INACTIVO = 0');
	while ($r){
	
		$cont .='
		<tr>
			<td>'.$n.'</td>
			<td>'.$razas->obtener('RAZA').'</td>
			<td>'.$razas->obtener('DESCRIPCION').'</td>
			<td><a href="./?url=razas&id='.$razas->obtener('ID').'" title="Editar" class="btn btn-success"><span class="glyphicon glyphicon-edit"></span></a></td>
		</tr>';
		$r = $razas->releer();
		$n++;
	}
	$cont.='
					</table>	
				<a href="./?url=razas" class="btn btn-primary">Agregar Raza Nueva</a>	
					
			</center>';
		
	
	$ds->contenido($cont); 
	$ds->mostrar();
	
?>